home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Debug / Assert.h < prev    next >
Text File  |  1997-06-28  |  412b  |  22 lines

  1. // Assert.h
  2.  
  3. #ifndef Assert_h
  4. #define Assert_h
  5.  
  6. #ifndef DebugMessage_h
  7. #include "DebugMessage.h"
  8. #endif
  9.  
  10. #include "ConfigureAssertions.h"
  11.  
  12. extern DebugMessage AssertionMessage( const int8 *file,
  13.                                                   uint32 line,
  14.                                                   const int8 *condition );
  15.  
  16. #define Assert( condition )    \
  17.   { \
  18.     if ( useAssertions && !(condition) ) \
  19.         AssertionMessage( __FILE__, __LINE__, #condition ).Show(); \
  20.   }
  21.  
  22. #endif